<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let res = prompt("请输入你的当前年龄")
    console.log(typeof res)
   //不要忘记转换为数字型
    alert("你5年之后是：" + (Number(res) + 5))
  </script>
</body>
</html>